using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WqLunTan.Models.DataBase
{
    /// <summary>
    /// 帖子的标题
    /// </summary>
    [Table("post_title")]
    public class post_title : BaseUpdateEntity
    {
        /// <summary>
        /// 添加者的id
        /// </summary>
        public Guid uid { get; set; }

        /// <summary>
        /// 帖子的标题
        /// </summary>
        [MaxLength(100)]
        [Required(AllowEmptyStrings = true)]
        public string title { get; set; } = string.Empty;

        /// <summary>
        /// 关键字
        /// </summary>
        [MaxLength(100)]
        [Required(AllowEmptyStrings = true)]
        public string keywords { get; set; } = string.Empty;

        /// <summary>
        /// 用户名
        /// </summary>
        [MaxLength(20)]
        [Required(AllowEmptyStrings = true)]
        public string user_name { get; set; } = string.Empty;

        /// <summary>
        /// 是否置顶
        /// </summary>
        public bool top { get; set; }

        /// <summary>
        /// 排序数字
        /// </summary>
        [Range(1, 100)]
        public int sort_num { get; set; } = 100;

        /// <summary>
        /// 是否显示
        /// </summary>
        public bool is_show { get; set; }

    }
}
